/*
 * Bishop.cpp
 *
 *  Created on: Mar 30, 2011
 *      Author: cnwilson
 */

#include "../inc/Bishop.h"


Bishop::Bishop(Color _color,Position _pos): Piece(_color,_pos,BISHOP){

}

vector<Position> Bishop::getPotentialMoves(){
	vector<Position> moves;
	Position quad1(1,1),quad2(-1,1),quad3(-1,-1),quad4(1,-1);

	Position temp(pos+quad1);
	while (temp<BOARDSIZE)
	{
		moves.push_back(temp);
		temp+=quad1;
	}

	temp=pos+quad2;
	while (temp>0 && temp<BOARDSIZE)
	{
		moves.push_back(temp);
		temp+=quad2;
	}

	temp=pos+quad3;
	while (temp>0)
	{
		moves.push_back(temp);
		temp+=quad3;
	}

	temp=pos+quad4;
	while (temp>0 && temp<BOARDSIZE)
	{
		moves.push_back(temp);
		temp+=quad4;
	}
	return moves;
}
